MODEL B-1 · THE BAND
====================

A band made of code. It plays songs written as text ("sheets") and renders
them to a sound file. Everything runs in your own browser, from this file.
Nothing is uploaded, nothing is installed. Best in Chrome or Edge on a computer.

  IN    a band sheet (.band.json), a small text file,
        or a few choices in the SONG BUILDER (no sheet to write)
  OUT   the sheet as code (SAVE), or the song as a WAV or an M4A, in your Downloads


WHAT'S INSIDE
-------------

  MODEL B-1 - the band.html
  songs for the band/
      Insert Coin.band.json     80s pop, an arcade at closing time
      Night Drive.band.json     synthwave, Am F C G
      Closes Truly.band.json    a round that closes on itself


NO SHEET? THE SONG BUILDER
--------------------------

  Press "✎ SONG BUILDER". Pick a style, a key (major is bright, minor is
  moody), one of the chord rows, the parts you want and their instruments,
  and short or long. Press "MAKE IT & PLAY". The band writes an ordinary
  sheet on the left and plays it: read it, change it, SAVE it, or press WAV.
  "🎲 another melody" writes a new tune over the same chords.


THREE STEPS
-----------

  1. Open "MODEL B-1 - the band.html". Press LOAD, choose a song from
     "songs for the band/", and press PLAY.

  2. Press WAV. The band renders the whole song, note by note, into a .wav
     in your Downloads. Click once and wait: long songs take a moment.

  3. The WAV is an ordinary sound file. Use it anywhere, or let a CHIMES
     board hear it (they're in the chimes pack, or in the full kit).


WRITING YOUR OWN SONG
---------------------

A sheet is JSON. Open one of the songs in a text editor to see a real one.

  {
    "kind": "BAND FOLIO",
    "title": "My Song",
    "tempo": 100,
    "meter": 4,
    "patterns": {
      "beat": {
        "kick":  { "inst": "linn kick",   "seq": "x...x...x...x..." },
        "snare": { "inst": "gated snare", "seq": "....x.......x...", "fx": ["reverb"] }
      },
      "pads": {
        "pad": { "inst": "PWM pad ♪", "seq": "Am@3 -*15 | F@3 -*15", "fx": ["pump", "reverb"] }
      }
    },
    "song": [
      { "name": "intro", "bars": 4, "play": ["pads"] },
      { "name": "verse", "bars": 8, "play": ["pads", "beat"] }
    ]
  }

- A pattern is a group of lanes. Each lane is one instrument and one sequence.
- The song is a list of sections. Each plays some patterns for a number of bars.
  A pattern loops to fill its section.
- One token = one sixteenth note. In 4/4, 16 tokens make a bar.

    .          rest
    -          hold the note before for one more sixteenth
    x  X       a hit (X is accented)
    A3 C#4 Bb2 a note (A4 = 440 Hz)
    Am F Cmaj7 Dm7 Esus4 G5    a chord (at the lane's "oct", default 3)
    F@4        a chord at a chosen octave
    A3+C4+E4   notes stacked by hand
    tok! tok?  accent / ghost
    tok*N      repeat, e.g. -*15 or .*63
    |          a bar line for your eyes only

- Lane options: "vol" 0-2 · "pan" -1..1 · "oct" · "fx": reverb, big reverb,
  delay, chorus, wide, drive, lofi, bright, pump (ducks under every kick).
- Click any voice on the band's shelf to hear it. Voices marked ♪ take notes.
- READ THE SHEET shows mistakes in words, under the sheet.
- Or ask your AI to write a sheet for you: give it this format and a mood.


HOW IT WAS MADE
---------------

One HTML file, written with Claude over many sessions. Every voice is built
live from oscillators and noise with the Web Audio API: no samples. The WAV
is rendered in an OfflineAudioContext; the M4A uses WebCodecs and mp4-muxer
(MIT licence), included in the file.

Made with Claude · by BeRogue · free to use and to learn from.
